package com.util;

import java.awt.image.BufferedImage;
import java.util.ArrayList;

public class Library {
	private String name;
	private BufferedImage img;

	private ArrayList<Shelf> shelves;

	public Library(String name, BufferedImage img) {
		this.name = name;
		this.img = img;
		shelves = new ArrayList<Shelf>();
	}

	public String getName() {
		return name;
	}

	public BufferedImage getImg() {
		return img;
	}

	public void addShelf(Shelf s) {
		shelves.add(s);
	}

	public ArrayList<Shelf> getShelves() {
		return shelves;
	}

	public void removeShelf(int pos) {
		shelves.remove(pos);
	}

	public void updateShelf(int pos, Shelf s) {
		shelves.get(pos).copy(s);
	}
}
